<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<form id="formulario" action="<?php echo url_for('banda/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?idbanda='.$form->getObject()->getIdbanda() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
    <?php if (!$form->getObject()->isNew()): ?>
    <input type="hidden" name="sf_method" value="put" />
    <?php endif; ?>
    <?php if ($form->getObject()->isNew()) :?>
    <h1> Nueva Banda </h1>
    <?php endif; ?><?php if (!$form->getObject()->isNew()) :?>
    <h1> Editar Banda </h1>
    <?php endif; ?>

    <table  >
        <tfoot>
            <tr>
                <td colspan="2">

                    <?php if (!$form->getObject()->isNew()): ?>
                    &nbsp;<?php echo link_to('Nuevos miembros', 'clienteNatural/new','class=btn black', array (
                        'popup' => array ('Integrantes', 'width=310,height=400,left=320,top=0',),
                        )) ?>
                    &nbsp;<?php echo link_to('Eliminar', 'banda/delete?idbanda='.$form->getObject()->getIdbanda(),'class=btn red',array('method' => 'delete', 'confirm' => 'Are you sure?')) ?>
                    <?php endif; ?>
                    <input type="button" class="btn blue"
                           onClick="location.href='<?php echo url_for('banda/index') ?>'" value="Volver"/>
                    <input type="submit"  class="btn green" value="Confirmar" />
                </td>
            </tr>
        </tfoot>
        <tbody>
            <?php echo $form ?>
        </tbody>
    </table>
</form>
